class RatingSubmitted < ActiveRecord::Base
    validates_presence_of :person_id
    validates_numericality_of :person_id
    
    
    def self.showRateSubmitteds()
        result = ""
        @rates = Person.find_by_sql("select p.* from people p, rating_submitteds r where r.person_id = p.id order by p.surname")
        result += "<ul>"
        @rates.each{ |person|
            result += "<li>"
            result += person.user
            result += "</li>"
        }
        result += "</ul>"
        result
	end
    
end
